# coding=utf-8

SUCCESS = 0
GET_INCOME_SUPPORT = 600
SHOW_RECOMMEND_PAY_NUM = 601
USER_ID_REQUIRED = 900
COMMAND_NOT_FOUND = 901
USER_NOT_FOUND_ON_DESK = 902
DESK_NOT_EXIST = 903
USER_IN_OTHER_DESK = 904
DESK_IS_FULL = 905
DESK_IS_PLAYING = 906
DESK_CONFIG_ERROR = 907
USER_LOGIN_OTHER_DEVICE = 908
NEED_PARAMS = 909
USER_NOT_IN_DB = 910
PASSWORD_ERROR = 911
PARAMS_ERROR = 912
MATCH_START_GAME_WRITE_ERROR = 913
MATCH_GAME_OVER_WRITE_ERROR = 914

UNKNOWN_ERROR = 996
SESSION_NOT_EXIST = 997
REPEAT_REQUEST = 998
INVALID_REQUEST = 999

ERROR_CODE_DESC = {
    SUCCESS: u"成功",
    GET_INCOME_SUPPORT: u"请领取低保",
    SHOW_RECOMMEND_PAY_NUM: u"显示推荐支付金额",
    USER_ID_REQUIRED: u"缺少userid",
    COMMAND_NOT_FOUND: u"消息未注册",
    USER_NOT_FOUND_ON_DESK: u"桌子中没有该用户",
    DESK_NOT_EXIST: u"桌子不存在",
    USER_IN_OTHER_DESK: u"用户在其他桌子中",
    DESK_IS_FULL: u"桌子已满",
    DESK_IS_PLAYING: u"桌子处于游戏中",
    DESK_CONFIG_ERROR: u"桌子自定义配置错误",
    USER_LOGIN_OTHER_DEVICE: u"用户在其他设备登录",
    NEED_PARAMS: u"缺少参数",
    USER_NOT_IN_DB: u"用户不在R数据库中",
    PASSWORD_ERROR: u"密码错误",
    PARAMS_ERROR: u"参数错误",
    MATCH_START_GAME_WRITE_ERROR: u"游戏开始数据写入失败",
    MATCH_GAME_OVER_WRITE_ERROR: u"游戏结束数据写入失败",

    UNKNOWN_ERROR: u"未知错误",
    SESSION_NOT_EXIST: u"会话不存在",
    REPEAT_REQUEST: u"重复请求",
    INVALID_REQUEST: u"非法请求",

}

PARAM_ERROR = 300
USER_PARAM_ERROR = 301
PASSWORD_PARAM_ERROR = 302
USER_STATUS_PARAM_ERROR = 303
HALL_LOGIN_ERROR = 305
NOT_LOGIN = 306
NOT_USER_EMAIL = 400
NOT_MATCH_EMAIL = 401
NOT_GOODS = 402
NOT_ENOUGH_DIAMOND = 403
USER_SAVE_CACHE_ERROR = 404
INSERT_ERROR = 405
GET_INCOME_SUPPORT_ERROR = 406
GET_INCOME_SUPPORT_THREE_TIME = 407
REGISTER_ERROR = 408
REGISTER_PARAM_ERROR = 409


HALL_ERROR_CODE_DESC = {
    PARAM_ERROR: u'参数错误',
    USER_PARAM_ERROR: u'账户尚未注册',
    PASSWORD_PARAM_ERROR: u'用户密码错误',
    USER_STATUS_PARAM_ERROR: u'此账户已被禁用',
    HALL_LOGIN_ERROR: u'大厅登录错误,skey错误',
    NOT_LOGIN: u'玩家未登录',
    NOT_USER_EMAIL: u'用户暂无邮件',
    NOT_MATCH_EMAIL: u'没有符合条件的邮件',
    NOT_GOODS: u'服务错误，没有商品列表',
    NOT_ENOUGH_DIAMOND: u'钻石不够,请充值',
    USER_SAVE_CACHE_ERROR: u'用户保存缓存错误',
    INSERT_ERROR: u'插入数据错误',
    GET_INCOME_SUPPORT_ERROR: u'获取破产补助错误,时间未到',
    GET_INCOME_SUPPORT_THREE_TIME: u'领取破产补助已经三次,请充值',
    REGISTER_ERROR: u'注册失败,用户名已存在',
    REGISTER_PARAM_ERROR: u'插入数据表错误'
}


